package model;

import java.io.Serializable;
import javax.persistence.*;
import java.util.Date;


/**
 * The persistent class for the mail database table.
 * 
 */
@Entity
@NamedQuery(name="Mail.findAll", query="SELECT m FROM Mail m")
public class Mail implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	private int idMail;

	@Temporal(TemporalType.DATE)
	private Date dateEnvoi;

	private String objet;

	//bi-directional many-to-one association to Intervenant
	@ManyToOne
	@JoinColumn(name="idIntervenat")
	private Intervenant intervenant;

	public Mail() {
	}

	public int getIdMail() {
		return this.idMail;
	}

	public void setIdMail(int idMail) {
		this.idMail = idMail;
	}

	public Date getDateEnvoi() {
		return this.dateEnvoi;
	}

	public void setDateEnvoi(Date dateEnvoi) {
		this.dateEnvoi = dateEnvoi;
	}

	public String getObjet() {
		return this.objet;
	}

	public void setObjet(String objet) {
		this.objet = objet;
	}

	public Intervenant getIntervenant() {
		return this.intervenant;
	}

	public void setIntervenant(Intervenant intervenant) {
		this.intervenant = intervenant;
	}

}